/**
 * 
 */
package com.yuedao.sender.model;

import javax.persistence.Entity;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao
 *
 *         网约车平台公司运价信息接口
 */
@Entity
public class BaseInfoCompanyFare extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6167965373059875296L;

	private int address;

	private String fareType;
	
	private String fareTypeNote;

	private Long fareValidOn;
	
	private Long fareValidOff;

	private String startFare;

	private String startMile;

	private String unitPricePerMile;

	private String unitPricePerMinute;
	
	private Float upPrice;
	
	private Float upPriceStartMile;

	private String morningPeakTimeOn;

	private String morningPeakTimeOff;

	private String eveningPeakTimeOn;

	private String eveningPeakTimeOff;
	
	private String otherPeakTimeOn;
	
	private String otherPeakTimeOff;

	private String peakUnitPrice;

	private String peakPriceStartMile;
	
	private Float LowSpeedPricePerMinute;
	
	private Float nightPricePerMile;
	
	private Float nightPricePerMinute;
	
	private Float otherPrice;

	private int state;
	
	public String getFareTypeNote() {
		return fareTypeNote;
	}

	public void setFareTypeNote(String fareTypeNote) {
		this.fareTypeNote = fareTypeNote;
	}

	public Float getUpPrice() {
		return upPrice;
	}

	public void setUpPrice(Float upPrice) {
		this.upPrice = upPrice;
	}

	public Float getUpPriceStartMile() {
		return upPriceStartMile;
	}

	public void setUpPriceStartMile(Float upPriceStartMile) {
		this.upPriceStartMile = upPriceStartMile;
	}

	public String getOtherPeakTimeOn() {
		return otherPeakTimeOn;
	}

	public void setOtherPeakTimeOn(String otherPeakTimeOn) {
		this.otherPeakTimeOn = otherPeakTimeOn;
	}

	public String getOtherPeakTimeOff() {
		return otherPeakTimeOff;
	}

	public void setOtherPeakTimeOff(String otherPeakTimeOff) {
		this.otherPeakTimeOff = otherPeakTimeOff;
	}

	public Float getLowSpeedPricePerMinute() {
		return LowSpeedPricePerMinute;
	}

	public void setLowSpeedPricePerMinute(Float lowSpeedPricePerMinute) {
		LowSpeedPricePerMinute = lowSpeedPricePerMinute;
	}

	public Float getNightPricePerMile() {
		return nightPricePerMile;
	}

	public void setNightPricePerMile(Float nightPricePerMile) {
		this.nightPricePerMile = nightPricePerMile;
	}

	public Float getNightPricePerMinute() {
		return nightPricePerMinute;
	}

	public void setNightPricePerMinute(Float nightPricePerMinute) {
		this.nightPricePerMinute = nightPricePerMinute;
	}

	public Float getOtherPrice() {
		return otherPrice;
	}

	public void setOtherPrice(Float otherPrice) {
		this.otherPrice = otherPrice;
	}

	public Long getFareValidOff() {
		return fareValidOff;
	}

	public void setFareValidOff(Long fareValidOff) {
		this.fareValidOff = fareValidOff;
	}

	public int getAddress() {
		return address;
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public String getFareType() {
		return fareType;
	}

	public void setFareType(String fareType) {
		this.fareType = fareType;
	}

	public Long getFareValidOn() {
		return fareValidOn;
	}

	public void setFareValidOn(Long fareValidOn) {
		this.fareValidOn = fareValidOn;
	}

	public String getStartFare() {
		return startFare;
	}

	public void setStartFare(String startFare) {
		this.startFare = startFare;
	}

	public String getStartMile() {
		return startMile;
	}

	public void setStartMile(String startMile) {
		this.startMile = startMile;
	}

	public String getUnitPricePerMile() {
		return unitPricePerMile;
	}

	public void setUnitPricePerMile(String unitPricePerMile) {
		this.unitPricePerMile = unitPricePerMile;
	}

	public String getUnitPricePerMinute() {
		return unitPricePerMinute;
	}

	public void setUnitPricePerMinute(String unitPricePerMinute) {
		this.unitPricePerMinute = unitPricePerMinute;
	}

	public String getMorningPeakTimeOn() {
		return morningPeakTimeOn;
	}

	public void setMorningPeakTimeOn(String morningPeakTimeOn) {
		this.morningPeakTimeOn = morningPeakTimeOn;
	}

	public String getMorningPeakTimeOff() {
		return morningPeakTimeOff;
	}

	public void setMorningPeakTimeOff(String morningPeakTimeOff) {
		this.morningPeakTimeOff = morningPeakTimeOff;
	}

	public String getEveningPeakTimeOn() {
		return eveningPeakTimeOn;
	}

	public void setEveningPeakTimeOn(String eveningPeakTimeOn) {
		this.eveningPeakTimeOn = eveningPeakTimeOn;
	}

	public String getEveningPeakTimeOff() {
		return eveningPeakTimeOff;
	}

	public void setEveningPeakTimeOff(String eveningPeakTimeOff) {
		this.eveningPeakTimeOff = eveningPeakTimeOff;
	}

	public String getPeakUnitPrice() {
		return peakUnitPrice;
	}

	public void setPeakUnitPrice(String peakUnitPrice) {
		this.peakUnitPrice = peakUnitPrice;
	}

	public String getPeakPriceStartMile() {
		return peakPriceStartMile;
	}

	public void setPeakPriceStartMile(String peakPriceStartMile) {
		this.peakPriceStartMile = peakPriceStartMile;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public static OTIpcDef.BaseInfoCompanyFare convert(BaseInfoCompanyFare data){
        OTIpcDef.BaseInfoCompanyFare item = OTIpcDef.BaseInfoCompanyFare.newBuilder()
                .setCompanyId(data.getCompanyId())
                .setAddress(data.getAddress())
                .setFareType(data.getFareType())
                .setFareTypeNote(data.getFareTypeNote())
                .setFareValidOn(Long.valueOf(data.getFareValidOn()))
                .setFareValidOff(Long.valueOf(data.getFareValidOff()))
                .setStartFare(Float.valueOf(data.getStartFare()))
                .setStartMile(Float.valueOf(data.getStartMile()))
                .setUnitPricePerMile(Float.valueOf(data.getUnitPricePerMile()))
                .setUnitPricePerMinute(Float.valueOf(data.getUnitPricePerMinute()))
                .setUpPrice(data.getUpPrice())
                .setUpPriceStartMile(data.getUpPriceStartMile())
                .setMorningPeakTimeOn(data.getMorningPeakTimeOn())
                .setMorningPeakTimeOff(data.getMorningPeakTimeOff())
                .setEveningPeakTimeOn(data.getEveningPeakTimeOn())
                .setEveningPeakTimeOff(data.getEveningPeakTimeOff())
                .setOtherPeakTimeOn(data.getOtherPeakTimeOn())
                .setOtherPeakTimeOff(data.getOtherPeakTimeOff())
                .setPeakUnitPrice(Float.valueOf(data.getPeakUnitPrice()))
                .setPeakPriceStartMile(Float.valueOf(data.getPeakPriceStartMile()))
                .setLowSpeedPricePerMinute(data.getLowSpeedPricePerMinute())
                .setNightPricePerMile(data.getNightPricePerMile())
                .setNightPricePerMinute(data.getNightPricePerMinute())
                .setState(data.getState())
                .setFlag(data.getFlag())
                .setUpdateTime(Long.valueOf(data.getUpdateTime()))
                .build();

        return item;
    }
}
